from multiprocessing import Pool, JoinableQueue, Queue
import time


def f(q: Queue):
    q.put("Hello")


if __name__ == '__main__':
    q = JoinableQueue()
    with Pool(processes=4) as pool:         # start 4 worker processes
        # evaluate "f(10)" asynchronously in a single process
        result = pool.apply_async(f, (q,))
        # prints "100" unless your computer is *very* slow
        pool.join()
    print(q.get())
